﻿using SqlSugar;

namespace OnHook.Domain.Entities
{
	/// <summary>
	/// 
	/// </summary>
    [SugarTable("t_setting", TableDescription = "系统配置")]
    public class Setting : AllBaseEntity
	{
		///<summary>
		/// Id（自增长）数据库主键没意义
		///</summary>
		[SugarColumn(IsPrimaryKey = true, ColumnName = "id", ColumnDescription = "主键Id",IsIdentity = true)]
		public int Id { get; set; } = 0;
		///<summary>
		/// 配置的Key
		///</summary>
		[SugarColumn(ColumnName = "key", ColumnDescription = "配置的Key")]
		public string Key { get; set; } = string.Empty;
		///<summary>
		/// 配置的Value
		///</summary>
		[SugarColumn(ColumnName = "value", ColumnDescription = "配置的Value")]
		public string Value { get; set; } = string.Empty;
		///<summary>
		/// 配置说明
		///</summary>
		[SugarColumn(ColumnName = "remark", ColumnDescription = "配置说明")]
		public string Remark { get; set; } = string.Empty;
		///<summary>
		/// 创建时间
		///</summary>
		[SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间")]
		public DateTime CreateTime { get; set; } = DateTime.Now;
		///<summary>
		/// 更新时间
		///</summary>
		[SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间")]
		public DateTime UpdateTime { get; set; } = DateTime.Now;
		///<summary>
		/// 环境
		///</summary>
		[SugarColumn(ColumnName = "env", ColumnDescription = "环境")]
		public string Env { get; set; } = string.Empty;

		/// <summary>
		/// 分组名称（用作类名）
		/// </summary>
		[SugarColumn(ColumnName = "option_key", ColumnDescription = "分组名称（用作类名）")]
		public string OptionKey { get; set; } = "";
	}
}
